<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>

<div ng-app="myApp" ng-controller="myCtrl">
    名：<input type="text" ng-model="firstName">
    名：<input type="text" ng-model="lastName">
    <h2>Hello {{firstName+lastName}}</h2>
    <input type="text" ng-model="title" ng-init="title=123"/>
    <h2>hello {{title}}</h2>
</div>
<script>
    var app=angular.module('myApp', []);
    app.controller('myCtrl', function($scope) {
        $scope.firstName= "John";
        $scope.lastName= "Doe";
        $scope.title= "sfdf";
    });
</script>
</body>
</html>